//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//********************************************************* 


namespace Microsoft.TridentWordAddIn.Common
{
    public class WorkflowParameter : DomainBase
    {
        private bool isValid = true;

        /// <summary>
        /// Initializes a new instance of the <see cref="Parameters"/> class.
        /// </summary>
        public WorkflowParameter()
        {
        }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the label.
        /// </summary>
        /// <value>The label.</value>
        public string Label { get; set; }

        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        /// <value>The type.</value>
        public string Type { get; set; }

        /// <summary>
        /// Gets or sets the type of the output.
        /// </summary>
        /// <value>The type of the output.</value>
        public string OutputType { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>The description.</value>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is input.
        /// </summary>
        /// <value><c>true</c> if this instance is input; otherwise, <c>false</c>.</value>
        public bool IsInput { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is bound.
        /// </summary>
        /// <value><c>true</c> if this instance is bound; otherwise, <c>false</c>.</value>
        public bool IsBound { get; set; }

        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>The value.</value>
        public object Value { get; set; }

        /// <summary>
        /// Gets the display value.
        /// </summary>
        /// <value>The display value.</value>
        public string DisplayValue
        {
            get
            {
                return Value == null ? string.Empty : Value.ToString();
            }
        }

        /// <summary>
        /// Gets or sets the belongs to activity.
        /// </summary>
        /// <value>The belongs to activity.</value>
        public string BelongsToActivity { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is valid.
        /// </summary>
        /// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value>
        public bool IsValid
        {
            get
            {
                return this.isValid;
            }
            set
            {
                this.isValid = value;
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is complex type.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is complex type; otherwise, <c>false</c>.
        /// </value>
        public bool IsComplexType { get; set; }

        /// <summary>
        /// Gets or sets the complex parsed value.
        /// </summary>
        /// <value>The complex parsed value.</value>
        public string ComplexParsedValue { get; set; }
    }
}
